import java.util.Scanner;

/**
 * @Author 12629
 * @Description：
 */
public class Test {

    public static void swap(int a,int b) {
        int tmp = a;
        a = b;
        b= tmp;
    }

    public static void main(String[] args) {
        int x = 10;
        int y = 20;
        System.out.println(x+" " + y);
        swap(x,y);
        System.out.println(x+" " + y);
    }

    public static int fac(int n) {
        int ret = 1;
        for (int i = 1; i <= n; i++) {
            ret *= i;
        }
        return ret;
    }

    public static int facNum(int k) {
        int sum = 0;
        for (int i = 1; i <= k; i++) {
            sum += fac(i);
        }
        return sum;
    }

    public static void main12(String[] args) {
        int n = 5;
        System.out.println(fac(n));
    }


    public static void main11(String[] args) {
        int sum = 0;
        for (int j = 1; j <= 5; j++) {
            int ret = 1;
            for (int i = 1; i <= j; i++) {
                ret *= i;
            }
            sum += ret;
        }
        System.out.println(sum);
    }



    public static int add(int a,int b) {
        return a+b;
    }

    public static boolean isLeapYear(int year) {
        if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
            return true;
        }
        return false;
    }

    public static void main9(String[] args) {
        for (int i = 0; i < args.length; i++) {
            System.out.println(args[i]);
        }
    }

    public static void main8(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        boolean ret = isLeapYear(year);
        System.out.println(ret);
    }


    public static void main7(String[] args) {
        int ret = add(1,2);
        System.out.println(ret);
    }

    public static void main6(String[] args) {
        int n = 7;
        //偶数位
        for (int i = 31; i >= 1 ; i -= 2) {
            System.out.print((n>>>i)&1);
        }
        System.out.println();
        //奇数位
        for (int i = 30; i >= 0 ; i -= 2) {
            System.out.print((n>>>i)&1);
        }

    }
    public static void main5(String[] args) {
        int count = 3;
        Scanner scanner = new Scanner(System.in);
        while (count != 0) {
            System.out.println("你还有 "+count+"次机会！");
            System.out.println("请输入密码：");
            String pass = scanner.nextLine();

            if(pass.equals("123456")) {
                System.out.println("登陆成功！");
                return;
            }else {
                count--;
            }

        }
    }

    public static void main4(String[] args) {
        int n = 123;
        while (n != 0) {
            System.out.println(n%10);
            n = n / 10;
        }
    }
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            for(int i = 0;i < n;i++) {
                for(int j = 0;j < n;j++) {
                    if(i == j || i+j == n-1) {
                        System.out.print("*");
                    }else {
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
    }
    public static void main2(String[] args) {
        double sum = 0.0;
        int flg = 1;
        for (int i = 1; i <= 100; i++) {
            sum = sum + 1.0/i * flg;
            flg = -flg;
        }
        System.out.println(sum);
    }
    public static void main1(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            if(i % 10 == 9) {
                count++;
            }
            if(i / 10 == 9) {
                count++;
            }
        }
        System.out.println(count);
    }
}
